<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"  
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="renderer" content="webkit">
   <!--  <meta name="_csrf" th:content="${_csrf.token}"/>
	<meta name="_csrf_header" th:content="${_csrf.headerName}"/> -->
    <title th:text="${indexTitle}">普天集成平台</title>
    <link rel="icon" type="image/x-icon" th:href="@{/images/favicon.ico}">
    <link rel="stylesheet" th:href="@{/assets/bootstrap/css/bootstrap.min.css}">
    <link rel="stylesheet" th:href="@{/assets/multiple-select/multiple-select.css}">
    <link rel="stylesheet" th:href="@{/assets/font-awesome/css/font-awesome.min.css}">
    <link rel="stylesheet" th:href="@{/assets/jqGrid/css/css/blitzer/jquery-ui.min.css}">
    <link rel="stylesheet" th:href="@{/assets/zTree/zTreeStyle/zTreeStyle.css}"> 
    <link rel="stylesheet" th:href="@{/assets/jqGrid/css/ui.jqgrid.css}">
    <link rel="stylesheet" th:href="@{/css/jqgridReset.css}">
    <link rel="stylesheet" th:href="@{/assets/toastr/toastr.css}">
    <link rel="stylesheet" th:href="@{/assets/BeAlert-master/BeAlert.css}">
    <link rel="stylesheet" th:href="@{/css/base.css}">
    <link rel="stylesheet" th:href="@{/css/index.css}">
    <link rel="stylesheet" id="themeLink">
    <script th:inline="javascript">
    	var contextPath = /*[[${contextPath}]]*/,
    		link = document.getElementById('themeLink'),
    		myTheme = "";
    	if(myTheme = localStorage.theme){
    		link.href = contextPath + "/css/theme/" + myTheme + ".css";
    	}else{
			link.href = contextPath + "/css/theme/3.css";
    	}
    </script>
</head>
<body>
    <!-- navbar start -->
    <div id="navBar" class="nav-bar clearfix">
        <!--navbar left start-->
            <div class="navbar-logo fl">
                <!-- logo -->
                <a href="#platform-commonGroup-common" title="主页" class=""></a>
                <!-- / logo -->
            </div>
        <!--navbar left end-->
        
        <!-- nabar right -->
        <ul class="nav-bar-right fr">
            <li class="dropdown">
                <a id="bell" href="javascript:;" data-toggle="dropdown">
                    <i class="iconfont">&#xe60d;</i>
                    <span class="remind">99</span>
                </a>
                <div class="dropdown-menu news" aria-labelledby="bell">
                    <div class="panel">
                        <div class="panel-heading">
                            <strong>You have <span>99</span> notifications</strong>
                        </div>
                        <div class="list-group">
                            <a href class="list-group-item">
                                <span>
                                    Use awesome animate.css<br>
                                    <small class="text-muted">10 minutes ago</small>
                                </span>
                            </a>
                            <a href class="list-group-item">
                                <span>
                                    1.0 initial released<br>
                                    <small class="text-muted">1 hour ago</small>
                                </span>
                            </a>
                        </div>
                        <div class="panel-footer">
                            <a href class="pull-right"><i class="fa fa-cog"></i></a>
                            <a href="#">See all the notifications</a>
                        </div>
                    </div>
                </div>
            </li>
            <li class="dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown">管控</a>
            </li>
            <li class="dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown">支持</a>
            </li>
            <li class="dropdown">
            	<a id="loginUser" href="#" class="dropdown-toggle" data-toggle="dropdown">admin<span class="caret"></span></a>
                <ul class="dropdown-menu" aria-labelledby="dLabel">
                    <!-- <li class="divider"></li> -->
                    <li><a id="logout" ui-sref="access.signin"><i class="fa fa-sign-out"></i><span>注销</span></a></li>
                </ul>
            </li>
            <li class="dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                    <i class="iconfont">&#xe601;</i>主题
                </a>
                <ul id="themeMenu" class="dropdown-menu">
                    <li data-id="0"><a href="javascript:;">墨色</a></li>
                    <li data-id="1"><a href="javascript:;">浅色</a></li>
                    <li data-id="2"><a href="javascript:;">深色</a></li>
                    <li data-id="3"><a href="javascript:;">靛蓝</a></li>
                    <li role="separator" class="divider"></li>
                    <li data-id="100"><a href="javascript:;">星空</a></li>
                    <li data-id="200"><a href="javascript:;">沙漠</a></li>
                    <li role="separator" class="divider"></li>
                    <li><a href="#">更多</a></li>
                </ul>
            </li>
        </ul>
        <!-- / nabar right -->
    </div>
    <!-- navbar end -->
	<!-- body box -->
	<div class="body-box">
		<!--asidebar start-->
	    <div id="asidebar" class="asidebar">
	    	<!-- toggle button -->
	            <div class="toggle-button">
	                <a href="javascript:;" id="asidebarSwitch">
	                    <i class="iconfont">&#xe626;</i>
	                </a>
	            </div>
	            <!-- / toggle button -->
	        <!-- nav -->
	            <div class="navList">
	                <!-- list -->
	                <ul class="nav" id='nav'></ul>
	                <!-- / list -->
	            </div>
	        <!-- nav -->
	    </div>
	    <!--sidebar end-->
	
	    <!--content-->
	    <div id="content" class="content">
		    
	    </div>
	</div>
    <script th:src="@{/assets/jquery/jquery-3.1.1.min.js}"></script>
    <script th:src="@{/assets/bootstrap/js/bootstrap.min.js}"></script>
    <script th:src="@{/assets/multiple-select/multiple-select.js}"></script>
    <script th:src="@{/assets/zTree/jquery.ztree.core.js}"></script>
    <script th:src="@{/assets/zTree/jquery.ztree.excheck.js}"></script>
    <script th:src="@{/assets/toastr/toastr.js}"></script>
    <script th:src="@{/assets/jquery-cookie/jquery.cookie.js}"></script>
    <script th:src="@{/assets/artTemplate/template.js}"></script>
    <script th:src="@{/assets/jqGrid/js/grid.locale-cn.js}"></script>
    <script th:src="@{/assets/jqGrid/js/jquery.jqGrid.src.js}"></script>
    <script th:inline="javascript">
    /*<![CDATA[*/
		var user = /*[[${user}]]*/;
		var userForAuth = null;
    	var userSubSystem = null;
   		//console.log(user);
    	$("#loginUser").html('<span class="user-name">' + user.displayName + '</span><span class="caret"></span>');
	    $.ajax({
			//url: contextPath + "/user/querySubSystemUsersByUserId/"+user.id,
			url: contextPath + "/user/querySubSystemUsersByUserId/"+user.id,
			type: "get",
			cache: false,
			dataType: "json",
			success: function(d){
				userSubSystem = d.data;
			},
			error: function(data){
				console.log(data);
			}
		});
	    $.ajax({
			url: contextPath + "/getCurrentUser",
			type: "get",
			cache: false,
			async: false,
			dataType: "json",
			success: function(d){
				userForAuth = d.data;
				console.log(userForAuth);
			},
			error: function(data){
				console.log(data);
			}
		});
	    var a = [[${#authorization.expression('hasAuthority(''queryOrganization'')')}]];
		var b = [[${#authorization.expression('hasAuthority(''queryRole'')')}]];
		var c = [[${#authorization.expression('hasAuthority(''querySubSystem'')')}]];
		var d = [[${#authorization.expression('hasAuthority(''queryUser'')')}]];
    /*]]>*/
	</script>
	<script th:src="@{/assets/BeAlert-master/BeAlert.js}"></script>
	<script th:src="@{/assets/ECharts/echarts.common.min.js}"></script>
    <script th:src="@{/js/index.js}"></script>
    
</body>
</html>